package cn.cjj.gulimall.cart.service;

import cn.cjj.gulimall.cart.vo.Cart;
import cn.cjj.gulimall.cart.vo.CartItem;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @author CuiJunJie
 * @create 2021/7/6-16:58
 */
@Service
public interface CartService {
    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    CartItem getCartItem(Long skuId);

    Cart getCart() throws ExecutionException, InterruptedException;

    void checkItem(Long skuId, Integer isChecked);

    void countItem(Long skuId, Integer num);

    void deleteItem(Long skuId);

    List<CartItem> currentUserCartItems();
}
